//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { CmsModelAuxiliaryTable, CmsModelAuxiliaryTableResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooCmsModelAuxiliaryTableList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<CmsModelAuxiliaryTableResponse>(`/uctoo/cms_model_auxiliary_table/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooCmsModelAuxiliaryTable = async (id: string) => {
  return requestClient.get<CmsModelAuxiliaryTable>(`/uctoo/cms_model_auxiliary_table/${id}`);
};

export const adductooCmsModelAuxiliaryTable = async (data: Partial<CmsModelAuxiliaryTable>) => {
  return requestClient.post<CmsModelAuxiliaryTable>('/uctoo/cms_model_auxiliary_table/add', data);
};

export const edituctooCmsModelAuxiliaryTable = async (data: Partial<CmsModelAuxiliaryTable>) => {
  return requestClient.post<CmsModelAuxiliaryTable>('/uctoo/cms_model_auxiliary_table/edit', data);
};

export const deleteuctooCmsModelAuxiliaryTable = async (id: string) => {
  return requestClient.post<any>('/uctoo/cms_model_auxiliary_table/del', { id });
};
